4c2e166ffbb32d5f3f96c8093ba2238a60695f85,src/com/opentaxi/android/RequestDetailsActivity.java,RequestDetailsActivity,showDetails,#,124

Before Change


                    Regions regions = RestClient.getInstance().getRegionById(RegionsType.BURGAS_STATE.getCode(), newCRequest.getRegionId());
                    if (regions != null) {
                        address.setText(regions.getDescription() + " " + newCRequest.getFullAddress());
                    } else address.setText(newCRequest.getFullAddress());

                    if (newCRequest.getCarNumber() != null && !newCRequest.getCarNumber().equals("")) {
                        car.setText((newCRequest.getNotes() != null ? newCRequest.getNotes() : "") + " №" + newCRequest.getCarNumber());

After Change


                if (requestNumber != null) {
                    requestNumber.setText(newCRequest.getRequestsId().toString());
                    datecreated.setText(DateFormat.getDateInstance(DateFormat.SHORT).format(newCRequest.getDatecreated()));
                    StringBuilder adr = new StringBuilder();
                    String destination = null;
                    if (newCRequest.getDetails() != null && newCRequest.getDetails().getFromCity() != null) {
                        adr.append(newCRequest.getDetails().getFromCity()).append(" ");
                        destination = newCRequest.getDetails().getDestination();
                    }

                    //Regions regions = RestClient.getInstance().getRegionById(RegionsType.BURGAS_STATE.getCode(), newCRequest.getRegionId());
                    if(regions!=null) {
                        Regions region = getRegionById(regions, newCRequest.getRegionId());
                        if (region != null) adr.append(region.getDescription()).append(" ");
                    }

                    adr.append(newCRequest.getFullAddress());
                    if (destination != null) adr.append(" \\").append(destination).append("\\");
                    address.setText(adr.toString());

                    if (newCRequest.getCarNumber() != null && !newCRequest.getCarNumber().equals("")) {
                        car.setText((newCRequest.getNotes() != null ? newCRequest.getNotes() : "") + " №" + newCRequest.getCarNumber());